package vis.core.mapper;

import vis.core.domain.db.SysUserOrg;
import com.mybatisflex.core.query.QueryWrapper;

import java.util.List;

public interface SysUserOrgMapper extends ZBMapper<SysUserOrg> {

    default List<String> getOrgIds(Object userId) {
        QueryWrapper eq = QueryWrapper.create().select("org_id").eq("user_id", userId);
        return selectObjectListByQueryAs(eq, String.class);
    }

    default List<String> getUserIds(Object orgId) {
        QueryWrapper eq = QueryWrapper.create().select("user_id").eq("org_id", orgId);
        return selectObjectListByQueryAs(eq, String.class);
    }


}